package com.ibm.cps.sql.expression.function.vector;

public class MeanDescriptor implements VectorFunctionDescriptor {


	@Override
	public Double[] evaluate(Double[] input) {
		double sum = 0;
		for (Double value : input) {
			sum += value;
		}
		return new Double[]{sum / input.length};
	}

	@Override
	public boolean isArray() {
		return false;
	}

}
